package com.dao;

import com.mypg.Comment;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface CommentDao {

    List<Comment> selectAllComment();
    int selectComment_count();
    Comment selectCommentByComment_id(int comment_id);
    List<Comment> selectComment_for_comment_table_jsp(@Param("user_nickname")String user_nickname,
                                                      @Param("question_id")int question_id,
                                                      @Param("time_start")Timestamp time_start,
                                                      @Param("time_end")Timestamp time_end,
                                                      @Param("start_row")int start_row,@Param("page_nums")int page_nums);
    int selectComment_count_For_comment_table_jsp(@Param("user_nickname")String user_nickname,
                                                  @Param("question_id")int question_id,
                                                  @Param("time_start")Timestamp time_start,
                                                  @Param("time_end")Timestamp time_end);
    List<Comment> selectCommentByQuestion_id(int question_id);

    void deleteCommentByComment_id(int comment_id);

    void insertComment(Comment comment);

    void updateComment_valueByComment_id(@Param("comment_id")int comment_id,@Param("comment_value")int comment_value);


}
